// 按需引入
import {
  Button,
  Message,
  MessageBox,
  Carousel,
  CarouselItem,
  Tabs,
  TabPane,
  Dialog,
  Autocomplete,
  Collapse,
  CollapseItem,
  Tree,
  Checkbox,
  CheckboxButton,
  CheckboxGroup,
  Popover,
  Tooltip,
  Pagination,
  Dropdown,
  DropdownMenu,
  DropdownItem
} from 'element-ui'

export default {
  install(Vue, options) {
    Vue.use(Button)
    Vue.use(Carousel)
    Vue.use(CarouselItem)
    Vue.use(Tabs)
    Vue.use(TabPane)
    Vue.use(Dialog)
    Vue.use(Autocomplete)
    Vue.use(Collapse)
    Vue.use(CollapseItem)
    Vue.use(Tree)
    Vue.use(Checkbox)
    Vue.use(CheckboxButton)
    Vue.use(CheckboxGroup)
    Vue.use(Popover)
    Vue.use(Tooltip)
    Vue.use(Pagination)
    Vue.use(Dropdown)
    Vue.use(DropdownMenu)
    Vue.use(DropdownItem)

    Vue.prototype.$message = Message
    Vue.prototype.$alert = MessageBox.alert

    Vue.prototype.$confirm = MessageBox.confirm
  }
}
